# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Jochen Immendörfer <jochen dot immendoerfer at gmail dot com>

pkgname=alsa-firmware
pkgver=1.0.29
pkgrel=2
pkgdesc="ALSA firmware package"
arch=('any')
url="http://alsa-project.org/"
license=('GPL')
source=(ftp://ftp.alsa-project.org/pub/firmware/$pkgname-$pkgver.tar.bz2)
options=(!strip)

build() {
  cd $srcdir/$pkgname-$pkgver
  ./configure --prefix=/usr --with-hotplug-dir=/usr/lib/firmware
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make DESTDIR=$pkgdir install
  # remove files which conflicts with linux-firmware
  rm -rf ${pkgdir}/usr/lib/firmware/{ct{efx,speq}.bin,ess,korg,sb16,yamaha}
  # remove broken symlinks (broken upstream)
  rm -rf ${pkgdir}/usr/lib/firmware/turtlebeach
  # remove empty dir
  rm -rf ${pkgdir}/usr/bin
}
md5sums=('9a1182f8a6ac44cb9af5774cc045565f')
